using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Attributes.DomainAttributes;
using Baci.Net.ToolKit.ArcGISProGeoprocessor.Models.Enums;
using System.Collections.Generic;
using System.ComponentModel;

namespace Baci.ArcGIS._3DAnalystTools._TINDataset
{
    /// <summary>
    /// <para>Delineate TIN Data Area</para>
    /// <para>Redefines the data area, or interpolation zone, of a triangulated irregular network (TIN) based on its triangle edge length.</para>
    /// <para>根据三角形边长度重新定义三角不规则网络 （TIN） 的数据区域或插值区域。</para>
    /// </summary>    
    [DisplayName("Delineate TIN Data Area")]
    public class DelineateTinDataArea : AbstractGPProcess
    {
        /// <summary>
        /// 无参构造
        /// </summary>
        public DelineateTinDataArea()
        {

        }

        /// <summary>
        /// 有参构造
        /// </summary>
        /// <param name="_in_tin">
        /// <para>Input TIN</para>
        /// <para>The TIN dataset to process.</para>
        /// <para>要处理的 TIN 数据集。</para>
        /// </param>
        /// <param name="_max_edge_length">
        /// <para>Maximum Edge Length</para>
        /// <para>The two-dimensional distance that defines the maximum length of a TIN triangle edge in the TIN's data area. Triangles with one or more edges that exceed this value will be considered outside the TIN's interpolation zone and will not be rendered in maps or used in surface analysis.</para>
        /// <para>定义 TIN 数据区域中 TIN 三角形边的最大长度的二维距离。具有一条或多条边超过此值的三角形将被视为 TIN 插值区域之外的三角形，并且不会在地图中渲染或用于曲面分析。</para>
        /// </param>
        public DelineateTinDataArea(object _in_tin, double? _max_edge_length)
        {
            this._in_tin = _in_tin;
            this._max_edge_length = _max_edge_length;
        }
        public override string ToolboxName => "3D Analyst Tools";

        public override string ToolName => "Delineate TIN Data Area";

        public override string CallName => "3d.DelineateTinDataArea";

        public override List<string> AcceptEnvironments => ["workspace"];

        public override object[] ParameterInfo => [_in_tin, _max_edge_length, _method.GetGPValue(), _derived_out_tin];

        /// <summary>
        /// <para>Input TIN</para>
        /// <para>The TIN dataset to process.</para>
        /// <para>要处理的 TIN 数据集。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Input TIN")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public object _in_tin { get; set; }


        /// <summary>
        /// <para>Maximum Edge Length</para>
        /// <para>The two-dimensional distance that defines the maximum length of a TIN triangle edge in the TIN's data area. Triangles with one or more edges that exceed this value will be considered outside the TIN's interpolation zone and will not be rendered in maps or used in surface analysis.</para>
        /// <para>定义 TIN 数据区域中 TIN 三角形边的最大长度的二维距离。具有一条或多条边超过此值的三角形将被视为 TIN 插值区域之外的三角形，并且不会在地图中渲染或用于曲面分析。</para>
        /// <para></para>
        /// </summary>
        [DisplayName("Maximum Edge Length")]
        [Description("")]
        [Option(OptionTypeEnum.Must)]
        public double? _max_edge_length { get; set; }


        /// <summary>
        /// <para>Method</para>
        /// <para><xdoc>
        ///   <para>The TIN edges that will be evaluated when delineating the TIN's data area.</para>
        ///   <bulletList>
        ///     <bullet_item>Perimeter Edges—Iterates through triangles from the TIN's outer extent inward and will stop when the current iteration of boundary triangle edges does not exceed the Maximum Edge Length. This is the default.</bullet_item><para/>
        ///     <bullet_item>All Edges—Classifies the entire collection of TIN triangles by edge length.</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para><xdoc>
        ///   <para>在描绘 TIN 的数据区域时将评估的 TIN 边。</para>
        ///   <bulletList>
        ///     <bullet_item>周长边 （Perimeter Edges） - 从 TIN 的外部范围向内循环访问三角形，当边界三角形边的当前小版本不超过最大边长度时，将停止。这是默认设置。</bullet_item><para/>
        ///     <bullet_item>所有边 （All Edges） - 按边长度对整个 TIN 三角形集合进行分类。</bullet_item><para/>
        ///   </bulletList>
        /// </xdoc></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Method")]
        [Description("")]
        [Option(OptionTypeEnum.optional)]
        public _method_value _method { get; set; } = _method_value._PERIMETER_ONLY;

        public enum _method_value
        {
            /// <summary>
            /// <para>Perimeter Edges</para>
            /// <para>Perimeter Edges—Iterates through triangles from the TIN's outer extent inward and will stop when the current iteration of boundary triangle edges does not exceed the Maximum Edge Length. This is the default.</para>
            /// <para>周长边 （Perimeter Edges） - 从 TIN 的外部范围向内循环访问三角形，当边界三角形边的当前小版本不超过最大边长度时，将停止。这是默认设置。</para>
            /// </summary>
            [Description("Perimeter Edges")]
            [GPEnumValue("PERIMETER_ONLY")]
            _PERIMETER_ONLY,

            /// <summary>
            /// <para>All Edges</para>
            /// <para>All Edges—Classifies the entire collection of TIN triangles by edge length.</para>
            /// <para>所有边 （All Edges） - 按边长度对整个 TIN 三角形集合进行分类。</para>
            /// </summary>
            [Description("All Edges")]
            [GPEnumValue("ALL")]
            _ALL,

        }

        /// <summary>
        /// <para>Updated TIN</para>
        /// <para></para>
        /// <para></para>
        /// <para></para>
        /// </summary>
        [DisplayName("Updated TIN")]
        [Description("")]
        [Option(OptionTypeEnum.derived)]
        public object _derived_out_tin { get; set; }


        public DelineateTinDataArea SetEnv(object workspace = null)
        {
            base.SetEnv(workspace: workspace);
            return this;
        }

    }

}